package top.infopub.mgr.bpa.service;

import com.github.pagehelper.Page;
import top.infopub.dto.bpa.PrimarySureDto;
import top.infopub.generic.GenericService;
import top.infopub.mgr.bpa.domain.PackageSureDomain;
import top.infopub.mgr.bpa.vo.PackageSureVo;
import top.infopub.model.bpa.PackageSure;
import top.infopub.model.bpa.PackageSureAtt;
import top.infopub.model.bpa.PackageSureDetail;

import java.util.List;

/**
 * Created by wurz on 2021/6/11.
 */
public interface PackageSureService extends GenericService<PackageSure, String> {

    /**
     * 根据条件查询分页数据
     * @param page
     * @param deviceSureVo
     * @return
     * @see
     */
    Page<PackageSureDomain> selectPageByDomainWhere(Page<PackageSureDomain> page,
                                                   PackageSureVo deviceSureVo);

    /**
     * 根据条件查询-我审批的分页数据
     * @param page
     * @param deviceSureVo
     * @return
     * @see
     */
    Page<PackageSureDomain> selectMyCheckByDomainWhere(Page<PackageSureDomain> page,
                                                      PackageSureVo deviceSureVo);

    /**
     * 新增记录
     * @param deviceSure
     * @param deviceSureDetails
     * @param deviceSureAtts
     * @see
     */
    void save(PackageSureVo deviceSure, List<PackageSureDetail> deviceSureDetails,
              List<PackageSureAtt> deviceSureAtts);

    /**
     * 查询详情数据
     * @param id
     * @return
     * @see
     */
    PackageSureVo queryById(String id);

    String insertById(PrimarySureDto primarySureDto, String creator);

    void updateByIdSelective(PrimarySureDto primarySureDto, String modifier);

}